package com.api;

import com.api.Fallback.UserClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author: LiuLi
 * @Date: 2025/09/03 11:55
 * @Description: 用户服务FeignClient
 */
@FeignClient(name = "user-service",fallbackFactory = UserClientFallback.class)
public interface UserClient {

    /**
     * 扣减用户余额
     * @param pw 密码
     * @param amount 金额
     */
    @PutMapping("/users/money/deduct")
    void deductMoney(@RequestParam("pw") String pw,@RequestParam("amount") Integer amount);
}